<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过度</title>
    <style>
        .out{
            height: 200px;
            width: 100%;
        }
        .box{
            height: 200px;
            width: 200px;
            background-color: bisque;
            opacity: 1;
            transition: opacity 3s;
            margin-left: 0;
        }
        .out:hover>.box{
            opacity: 0;
            margin-left: 500px;
        }
    </style>
</head>
<body>
    <div class="out">
        <div class="box">

    </div>
    </div>
    
</body>
</html>